package com.huawei;

import java.util.Scanner;

public class HJ015 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        String str = Integer.toBinaryString(input);
        char[] charArray = str.toCharArray();
        int count = 0;
        for(char c:charArray){
            if (c == '1'){
                count ++;
            }
        }
        System.out.println(count);
    }
}
